package com.cskaoyan.bean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class User {
    @NotNull
    @Length(min = 6)
    String username;
    @Length(min = 6,max = 10,message = "{good}")
    String password;
    @Min(18)
    Integer age;
    String gender;
}
